package com.ccrfid.rmc6.entity.video;

import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "video_camera")
public class VideoCameraEntity {
    private Long id;
    private String cameraSn;
    private String cameraName;
    private String orgSn;
    private String ip;
    private String ip2;
    private Integer port;
    private String username;
    private String passwd;
    private Integer channelNum;
    private Integer recordLocation;     //0-中心存储；1-设备存储
    private Integer cameraType;
    private Integer cameraVersion;
    private Timestamp createTime;
    private Timestamp updateTime;

    @Id
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "camera_sn", nullable = false, length = 64)
    public String getCameraSn() {
        return cameraSn;
    }

    public void setCameraSn(String cameraSn) {
        this.cameraSn = cameraSn;
    }

    @Basic
    @Column(name = "camera_name", nullable = false, length = 64)
    public String getCameraName() {
        return cameraName;
    }

    public void setCameraName(String cameraName) {
        this.cameraName = cameraName;
    }

    @Basic
    @Column(name = "org_sn", length = 45)
    public String getOrgSn() {
        return orgSn;
    }

    public void setOrgSn(String orgSn) {
        this.orgSn = orgSn;
    }

    @Basic
    @Column(name = "ip", nullable = false, length = 15)
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Basic
    @Column(name = "ip2", nullable = true, length = 15)
    public String getIp2() {
        return ip2;
    }

    public void setIp2(String ip2) {
        this.ip2 = ip2;
    }

    @Basic
    @Column(name = "port", nullable = false)
    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    @Basic
    @Column(name = "username", nullable = true, length = 32)
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Basic
    @Column(name = "passwd", nullable = true, length = 32)
    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }

    @Basic
    @Column(name = "channel_num", nullable = true)
    public Integer getChannelNum() {
        return channelNum;
    }

    public void setChannelNum(Integer channelNum) {
        this.channelNum = channelNum;
    }

    @Basic
    @Column(name = "record_location", nullable = true)
    public Integer getRecordLocation() {
        return recordLocation;
    }

    public void setRecordLocation(Integer recordLocation) {
        this.recordLocation = recordLocation;
    }

    @Basic
    @Column(name = "camera_type", nullable = false)
    public Integer getCameraType() {
        return cameraType;
    }

    public void setCameraType(Integer cameraType) {
        this.cameraType = cameraType;
    }

    @Basic
    @Column(name = "camera_version", nullable = false)
    public Integer getCameraVersion() {
        return cameraVersion;
    }

    public void setCameraVersion(Integer cameraVersion) {
        this.cameraVersion = cameraVersion;
    }

    @Basic
    @Column(name = "create_time", nullable = false)
    @CreationTimestamp
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time", nullable = false)
    @UpdateTimestamp
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }
}
